﻿/***********************************************************************
 * <copyright file="ValidatePasswordAttribute.cs" company="BSD JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   Hoang Bich Son 
 * Email:    sonhb@newman.vn
 * Website:
 * Create Date: Thursday, April 24, 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System.ComponentModel.DataAnnotations;

namespace DxMvcApplication.Code.Attributes
{
    /// <summary>
    /// Custom annotation attribute.
    /// Used to validate Passwords. Min length is 7, max is 100.
    /// </summary>
    public class ValidatePasswordAttribute : StringLengthAttribute
    {
        /// <summary>
        /// Constructor of ValidatePasswordAttribute.
        /// Used to validate Email addresses.
        /// </summary>
        public ValidatePasswordAttribute()
            : base(100)
        {
            MinimumLength = 6;
            ErrorMessage = "Mật khẩu phải tối thiểu 6 ký tự";
        }
    }
}